import request from 'utils/request'

// 获取预约订单数据
export function GetProductBookData(data) {
  return request({
    url: '/Product/GetProductBookData',
    method: 'post',
    data: data
  })
}
 // 获取房间列表
 export function GetCanBookRoomList(data) {
   return request({
     url: '/Product/GetCanBookRoomList',
     method: 'post',
     data: data
   })
 }
// 提交预约订单
export function SubmitBookOrder(data) {
  return request({
    url: '/Order/SubmitBookOrder',
    method: 'post',
    data: data
  })
}
// 获取预约订单列表
export function GetOrderBookPage(data) {
  return request({
    url: '/Order/GetOrderBookPage',
    method: 'post',
    data: data
  })
}
// 入住
export function OrderBookIn(data) {
  return request({
    url: '/Order/OrderBookIn?orderId='+data,
    method: 'post',
  })
}
// 退房
export function OrderBookOut(data) {
  return request({
    url: '/Order/OrderBookOut?orderId='+data,
    method: 'post',
  })
}
// 取消订单
export function CancleOrder(data) {
  return request({
    url: '/Order/OrderCancel?orderId='+data,
    method: 'post',
  })
}
// 申请退款
export function OrderRefundApply(data) {
  return request({
    url: '/Order/OrderRefundApply',
    method: 'post',
    data: data
  })
}
// 开门码
export function GetRoomQrCode(data) {
  return request({
    url: '/Order/GetRoomQrCode?orderId='+data,
    method: 'post',
  })
}
// 获取预约订单信息
export function GetOrderBookInfo(data) {
  return request({
    url: '/Order/GetOrderBookInfo?orderId='+data,
    method: 'get',
  })
}
// 获取预约订单列表(门店端)
export function GetOrderBookPageByStore(data) {
  return request({
    url: '/Order/GetOrderBookPageByStore',
    method: 'post',
    data: data
  })
}
// 预约订单入住(门店端)
export function OrderBookInByStore(data) {
  return request({
    url: '/Order/OrderBookInByStore',
    method: 'post',
    data: data
  })
}
// 预约订单退房(门店端)
export function OrderBookOutByStore(data) {
  return request({
    url: '/Order/OrderBookOutByStore?orderId=' + data,
    method: 'post',
  })
}
// 获取房间列表
export function GetBookRoomPageByStore(data) {
  return request({
    url: '/Product/GetBookRoomPageByStore',
    method: 'post',
    data: data
  })
}
// 修改门店房间状态(门店端)
export function ProductRoomUpdateState(roomId,state) {
  return request({
    url: '/Product/ProductRoomUpdateState?roomId=' + roomId + "&state=" + state,
    method: 'post',
  })
}
// 门店退款订单
export function ConfirmOrderRefundByStore(data) {
  return request({
    url: '/Order/ConfirmOrderRefundByStore?orderId=' + data,
    method: 'post',
  })
}

// 开门码(打扫)
export function GetRoomQrCodeByRoomId(params) {
  return request({
    url: '/Order/GetRoomQrCodeByRoomId',
    method: 'get',
		params: params
  })
}

// 获取续单信息
export function GetCanAddBookOrderTime(params) {
  return request({
    url: '/Order/GetCanAddBookOrderTime',
    method: 'get',
		params: params
  })
}

// 提交续单订单
export function SubmitAddBookOrder(data) {
  return request({
    url: '/Order/SubmitAddBookOrder',
    method: 'post',
		data:data
  })
}
// 删除房间
export function ProductRoomDelete(data) {
  return request({
    url: '/Product/ProductRoomDelete?ids='+data,
    method: 'get',
  })
}
// 修改房间
export function ProductRoomAddOrEdit(data) {
  return request({
    url: '/Product/ProductRoomAddOrEdit',
    method: 'post',
		data:data
  })
}
//获取预定配置分页
export function GetProductBookSettingPage(data) {
  return request({
    url: '/Product/GetProductBookSettingPage',
    method: 'post',
		data:data
  })
}
//获取预定配置
export function GetProductBookSetting(data) {
  return request({
    url: '/Product/GetProductBookSetting?id='+data,
    method: 'get',
  })
}
//修改预定配置
export function ProductBookSettingAddOrEdit(data) {
  return request({
    url: '/Product/ProductBookSettingAddOrEdit',
    method: 'post',
		data:data
  })
}
// 删除预定配置
export function ProductBookSettingDelete(data) {
  return request({
    url: '/Product/ProductBookSettingDelete?ids='+data,
    method: 'get',
  })
}
//获取商品列表(预定配置)
export function GetStoreSupplierProductPage(data) {
  return request({
    url: '/Product/GetStoreSupplierProductPage',
    method: 'post',
		data:data
  })
}
